<!DOCTYPE html>
<html><head>
	<meta charset="UTF-8">
	<meta http-equiv="x-UA-Compatible" content="ie=Edge">
   	<meta name="viewport" content="width=device-width, initial-scale=1">
   	<title>Crafty - Crafty.keys</title>
	<link type="text/css" rel="stylesheet" href="../craftyjs-site.css">
	<link rel="shortcut icon" href="../favicon.ico">
</head>
<body>
	<div id="header-background"> </div>
	<div id="page-frame">
	<div id="header">
		<nav class="navbar">
  			<div class="container-fluid">
  				<div class="navbar-header">
  					<a class="navbar-brand" href="../"> <img class="logo" src="../images/text-logo.png"> </a>
  					
				</div>
				<div class="collapse navbar-collapse navbar-right" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li><a href="../">首页</a></li>
						<li><a href="../getting-started/">快速开始</a></li>
						<li><a href="../documentation/">文档</a></li>
						<li><a href="../api/">API</a></li>
						<li><a href="../components/">组件</a></li>
						<li class="emph"><a href="../#install">下载</a></li>
					</ul>
				</div>
			</div>
		</nav>
	</div>


	<div id="main">
		<div id="content" class="container">
			



<div id="docs"><div class="toc-holder" id="doc-nav"><ul id="doc-level-one"><li><a href="events.html">事件列表</a></li><li class="category">核心<ul class="category-list"><li><a href="Crafty.html">Crafty</a></li><li><a href="Crafty Core.html">Crafty Core</a></li><li><a href="Crafty-bind.html">Crafty.bind()</a></li><li><a href="Crafty-c.html">Crafty.c()</a></li><li><a href="Crafty-clone.html">Crafty.clone()</a></li><li><a href="Crafty-defineField.html">Crafty.defineField()</a></li><li><a href="Crafty-e.html">Crafty.e()</a></li><li><a href="Crafty-extend.html">Crafty.extend()</a></li><li><a href="Crafty-frame.html">Crafty.frame()</a></li><li><a href="Crafty-getVersion.html">Crafty.getVersion()</a></li><li><a href="Crafty-init.html">Crafty.init()</a></li><li><a href="Crafty-isPaused.html">Crafty.isPaused()</a></li><li><a href="Crafty-one.html">Crafty.one()</a></li><li><a href="Crafty-pause.html">Crafty.pause()</a></li><li><a href="Crafty-s.html">Crafty.s()</a></li><li><a href="Crafty-settings.html">Crafty.settings</a></li><li><a href="Crafty-stage.html">Crafty.stage</a></li><li><a href="Crafty-stop.html">Crafty.stop()</a></li><li><a href="Crafty-support.html">Crafty.support</a></li><li><a href="Crafty-trigger.html">Crafty.trigger()</a></li><li><a href="Crafty-unbind.html">Crafty.unbind()</a></li><li><a href="Crafty-uniqueBind.html">Crafty.uniqueBind()</a></li></ul></li><li class="category">2D<ul class="category-list"><li><a href="2D.html">2D</a></li><li><a href="AngularMotion.html">AngularMotion</a></li><li><a href="Collision.html">Collision</a></li><li><a href="Crafty-circle.html">Crafty.circle</a></li><li><a href="Crafty-diamondIso.html">Crafty.diamondIso</a></li><li><a href="Crafty-HashMap.html">Crafty.HashMap</a></li><li><a href="Crafty-isometric.html">Crafty.isometric</a></li><li><a href="Crafty-map.html">Crafty.map</a></li><li><a href="Crafty-math-Matrix2D.html">Crafty.math.Matrix2D</a></li><li><a href="Crafty-math-Vector2D.html">Crafty.math.Vector2D</a></li><li><a href="Crafty-polygon.html">Crafty.polygon</a></li><li><a href="Crafty-raycast.html">Crafty.raycast()</a></li><li><a href="Crafty-rectManager.html">Crafty.rectManager</a></li><li><a href="Gravity.html">Gravity</a></li><li><a href="GroundAttacher.html">GroundAttacher</a></li><li><a href="Motion.html">Motion</a></li><li><a href="Supportable.html">Supportable</a></li></ul></li><li class="category">动画<ul class="category-list"><li><a href="Crafty-easing.html">Crafty.easing</a></li><li><a href="SpriteAnimation.html">SpriteAnimation</a></li><li><a href="Tween.html">Tween</a></li></ul></li><li class="category">资源<ul class="category-list"><li><a href="Crafty-asset.html">Crafty.asset()</a></li><li><a href="Crafty-assets.html">Crafty.assets</a></li><li><a href="Crafty-imageWhitelist.html">Crafty.imageWhitelist()</a></li><li><a href="Crafty-load.html">Crafty.load()</a></li><li><a href="Crafty-paths.html">Crafty.paths()</a></li><li><a href="Crafty-removeAssets.html">Crafty.removeAssets()</a></li></ul></li><li class="category">音频<ul class="category-list"><li><a href="Crafty-audio.html">Crafty.audio</a></li></ul></li><li class="category">控制器<ul class="category-list"><li><a href="Controllable.html">Controllable</a></li><li><a href="Controls.html">Controls</a></li><li><a href="Draggable.html">Draggable</a></li><li><a href="Fourway.html">Fourway</a></li><li><a href="Jumper.html">Jumper</a></li><li><a href="Multiway.html">Multiway</a></li><li><a href="Twoway.html">Twoway</a></li></ul></li><li class="category">调试<ul class="category-list"><li><a href="Crafty-error.html">Crafty.error()</a></li><li><a href="Crafty-log.html">Crafty.log()</a></li><li><a href="DebugCanvas.html">DebugCanvas</a></li><li><a href="DebugPolygon.html">DebugPolygon</a></li><li><a href="DebugRectangle.html">DebugRectangle</a></li><li><a href="SolidAreaMap.html">SolidAreaMap</a></li><li><a href="SolidHitBox.html">SolidHitBox</a></li><li><a href="VisibleMBR.html">VisibleMBR</a></li><li><a href="WiredAreaMap.html">WiredAreaMap</a></li><li><a href="WiredHitBox.html">WiredHitBox</a></li></ul></li><li class="category">事件<ul class="category-list"><li><a href="Crafty-addEvent.html">Crafty.addEvent()</a></li><li><a href="Crafty-bind.html">Crafty.bind()</a></li><li><a href="Crafty-one.html">Crafty.one()</a></li><li><a href="Crafty-removeEvent.html">Crafty.removeEvent()</a></li><li><a href="Crafty-trigger.html">Crafty.trigger()</a></li><li><a href="Crafty-unbind.html">Crafty.unbind()</a></li><li><a href="Crafty-uniqueBind.html">Crafty.uniqueBind()</a></li></ul></li><li class="category">游戏循环<ul class="category-list"><li><a href="Crafty-timer.html">Crafty.timer</a></li></ul></li><li class="category">图形<ul class="category-list"><li><a href="Canvas.html">Canvas</a></li><li><a href="CanvasLayer.html">CanvasLayer</a></li><li><a href="Color.html">Color</a></li><li><a href="Crafty-assignColor.html">Crafty.assignColor()</a></li><li><a href="Crafty-background.html">Crafty.background()</a></li><li><a href="Crafty-createLayer.html">Crafty.createLayer()</a></li><li><a href="Crafty-defaultShader.html">Crafty.defaultShader()</a></li><li><a href="Crafty-domHelper.html">Crafty.domHelper</a></li><li><a href="Crafty-pixelart.html">Crafty.pixelart()</a></li><li><a href="Crafty-sprite.html">Crafty.sprite()</a></li><li><a href="Crafty-WebGLShader.html">Crafty.WebGLShader()</a></li><li><a href="DOM.html">DOM</a></li><li><a href="DomLayer.html">DomLayer</a></li><li><a href="HTML.html">HTML</a></li><li><a href="Image.html">Image</a></li><li><a href="Particles.html">Particles</a></li><li><a href="Renderable.html">Renderable</a></li><li><a href="Sprite.html">Sprite</a></li><li><a href="Text.html">Text</a></li><li><a href="WebGL.html">WebGL</a></li><li><a href="WebGLLayer.html">WebGLLayer</a></li></ul></li><li class="category">输入<ul class="category-list"><li><a href="AreaMap.html">AreaMap</a></li><li><a href="Button.html">Button</a></li><li><a href="Crafty-findPointerEventTargetByComponent.html">Crafty.findPointerEventTargetByComponent()</a></li><li><a href="Crafty-keyboardDispatch.html">Crafty.keyboardDispatch()</a></li><li><a href="Crafty-keydown.html">Crafty.keydown</a></li><li><a href="Crafty-keys.html">Crafty.keys</a></li><li><a href="Crafty-lastEvent.html">Crafty.lastEvent</a></li><li><a href="Crafty-mouseButtons.html">Crafty.mouseButtons</a></li><li><a href="Crafty-mouseDispatch.html">Crafty.mouseDispatch()</a></li><li><a href="Crafty-mouseWheelDispatch.html">Crafty.mouseWheelDispatch()</a></li><li><a href="Crafty-multitouch.html">Crafty.multitouch()</a></li><li><a href="Crafty-selected.html">Crafty.selected</a></li><li><a href="Crafty-touchDispatch.html">Crafty.touchDispatch()</a></li><li><a href="Keyboard.html">Keyboard</a></li><li><a href="Mouse.html">Mouse</a></li><li><a href="MouseDrag.html">MouseDrag</a></li><li><a href="Touch.html">Touch</a></li></ul></li><li class="category">杂项<ul class="category-list"><li><a href="Crafty-addEvent.html">Crafty.addEvent()</a></li><li><a href="Crafty-device.html">Crafty.device</a></li><li><a href="Crafty-removeEvent.html">Crafty.removeEvent()</a></li><li><a href="Crafty-support.html">Crafty.support</a></li></ul></li><li class="category">模型<ul class="category-list"><li><a href="Model.html">Model</a></li></ul></li><li class="category">场景<ul class="category-list"><li><a href="Crafty-scene.html">Crafty.scene()</a></li></ul></li><li class="category">舞台<ul class="category-list"><li><a href="Crafty-background.html">Crafty.background()</a></li><li><a href="Crafty-scene.html">Crafty.scene()</a></li><li><a href="Crafty-viewport.html">Crafty.viewport</a></li></ul></li><li class="category">工具<ul class="category-list"><li><a href="Crafty-math.html">Crafty.math</a></li><li><a href="Delay.html">Delay</a></li><li><a href="Storage.html">Storage</a></li></ul></li></ul></div><div id="doc-content" class="doc-page-holder"><div class="doc-page"><h1>Crafty.keys <span></span></h1><div class="doclet" id="Crafty-keys"><span class="markdown"><p>按键名称的对象和相应的unicode按键代码。</p>
<pre><code class="hljs ">BACKSPACE: <span class="hljs-number">8</span>,
<span class="hljs-attr">TAB</span>: <span class="hljs-number">9</span>,
<span class="hljs-attr">ENTER</span>: <span class="hljs-number">13</span>,
<span class="hljs-attr">PAUSE</span>: <span class="hljs-number">19</span>,
<span class="hljs-attr">CAPS</span>: <span class="hljs-number">20</span>,
<span class="hljs-attr">ESC</span>: <span class="hljs-number">27</span>,
<span class="hljs-attr">SPACE</span>: <span class="hljs-number">32</span>,
<span class="hljs-attr">PAGE_UP</span>: <span class="hljs-number">33</span>,
<span class="hljs-attr">PAGE_DOWN</span>: <span class="hljs-number">34</span>,
<span class="hljs-attr">END</span>: <span class="hljs-number">35</span>,
<span class="hljs-attr">HOME</span>: <span class="hljs-number">36</span>,
<span class="hljs-attr">LEFT_ARROW</span>: <span class="hljs-number">37</span>,
<span class="hljs-attr">UP_ARROW</span>: <span class="hljs-number">38</span>,
<span class="hljs-attr">RIGHT_ARROW</span>: <span class="hljs-number">39</span>,
<span class="hljs-attr">DOWN_ARROW</span>: <span class="hljs-number">40</span>,
<span class="hljs-attr">INSERT</span>: <span class="hljs-number">45</span>,
<span class="hljs-attr">DELETE</span>: <span class="hljs-number">46</span>,
<span class="hljs-number">0</span>: <span class="hljs-number">48</span>,
<span class="hljs-number">1</span>: <span class="hljs-number">49</span>,
<span class="hljs-number">2</span>: <span class="hljs-number">50</span>,
<span class="hljs-number">3</span>: <span class="hljs-number">51</span>,
<span class="hljs-number">4</span>: <span class="hljs-number">52</span>,
<span class="hljs-number">5</span>: <span class="hljs-number">53</span>,
<span class="hljs-number">6</span>: <span class="hljs-number">54</span>,
<span class="hljs-number">7</span>: <span class="hljs-number">55</span>,
<span class="hljs-number">8</span>: <span class="hljs-number">56</span>,
<span class="hljs-number">9</span>: <span class="hljs-number">57</span>,
<span class="hljs-attr">A</span>: <span class="hljs-number">65</span>,
<span class="hljs-attr">B</span>: <span class="hljs-number">66</span>,
<span class="hljs-attr">C</span>: <span class="hljs-number">67</span>,
<span class="hljs-attr">D</span>: <span class="hljs-number">68</span>,
<span class="hljs-attr">E</span>: <span class="hljs-number">69</span>,
<span class="hljs-attr">F</span>: <span class="hljs-number">70</span>,
<span class="hljs-attr">G</span>: <span class="hljs-number">71</span>,
<span class="hljs-attr">H</span>: <span class="hljs-number">72</span>,
<span class="hljs-attr">I</span>: <span class="hljs-number">73</span>,
<span class="hljs-attr">J</span>: <span class="hljs-number">74</span>,
<span class="hljs-attr">K</span>: <span class="hljs-number">75</span>,
<span class="hljs-attr">L</span>: <span class="hljs-number">76</span>,
<span class="hljs-attr">M</span>: <span class="hljs-number">77</span>,
<span class="hljs-attr">N</span>: <span class="hljs-number">78</span>,
<span class="hljs-attr">O</span>: <span class="hljs-number">79</span>,
<span class="hljs-attr">P</span>: <span class="hljs-number">80</span>,
<span class="hljs-attr">Q</span>: <span class="hljs-number">81</span>,
<span class="hljs-attr">R</span>: <span class="hljs-number">82</span>,
<span class="hljs-attr">S</span>: <span class="hljs-number">83</span>,
<span class="hljs-attr">T</span>: <span class="hljs-number">84</span>,
<span class="hljs-attr">U</span>: <span class="hljs-number">85</span>,
<span class="hljs-attr">V</span>: <span class="hljs-number">86</span>,
<span class="hljs-attr">W</span>: <span class="hljs-number">87</span>,
<span class="hljs-attr">X</span>: <span class="hljs-number">88</span>,
<span class="hljs-attr">Y</span>: <span class="hljs-number">89</span>,
<span class="hljs-attr">Z</span>: <span class="hljs-number">90</span>,
<span class="hljs-attr">NUMPAD_0</span>: <span class="hljs-number">96</span>,
<span class="hljs-attr">NUMPAD_1</span>: <span class="hljs-number">97</span>,
<span class="hljs-attr">NUMPAD_2</span>: <span class="hljs-number">98</span>,
<span class="hljs-attr">NUMPAD_3</span>: <span class="hljs-number">99</span>,
<span class="hljs-attr">NUMPAD_4</span>: <span class="hljs-number">100</span>,
<span class="hljs-attr">NUMPAD_5</span>: <span class="hljs-number">101</span>,
<span class="hljs-attr">NUMPAD_6</span>: <span class="hljs-number">102</span>,
<span class="hljs-attr">NUMPAD_7</span>: <span class="hljs-number">103</span>,
<span class="hljs-attr">NUMPAD_8</span>: <span class="hljs-number">104</span>,
<span class="hljs-attr">NUMPAD_9</span>: <span class="hljs-number">105</span>,
<span class="hljs-attr">MULTIPLY</span>: <span class="hljs-number">106</span>,
<span class="hljs-attr">ADD</span>: <span class="hljs-number">107</span>,
<span class="hljs-attr">SUBSTRACT</span>: <span class="hljs-number">109</span>,
<span class="hljs-attr">DECIMAL</span>: <span class="hljs-number">110</span>,
<span class="hljs-attr">DIVIDE</span>: <span class="hljs-number">111</span>,
<span class="hljs-attr">F1</span>: <span class="hljs-number">112</span>,
<span class="hljs-attr">F2</span>: <span class="hljs-number">113</span>,
<span class="hljs-attr">F3</span>: <span class="hljs-number">114</span>,
<span class="hljs-attr">F4</span>: <span class="hljs-number">115</span>,
<span class="hljs-attr">F5</span>: <span class="hljs-number">116</span>,
<span class="hljs-attr">F6</span>: <span class="hljs-number">117</span>,
<span class="hljs-attr">F7</span>: <span class="hljs-number">118</span>,
<span class="hljs-attr">F8</span>: <span class="hljs-number">119</span>,
<span class="hljs-attr">F9</span>: <span class="hljs-number">120</span>,
<span class="hljs-attr">F10</span>: <span class="hljs-number">121</span>,
<span class="hljs-attr">F11</span>: <span class="hljs-number">122</span>,
<span class="hljs-attr">F12</span>: <span class="hljs-number">123</span>,
<span class="hljs-attr">SHIFT</span>: <span class="hljs-number">16</span>,
<span class="hljs-attr">CTRL</span>: <span class="hljs-number">17</span>,
<span class="hljs-attr">ALT</span>: <span class="hljs-number">18</span>,
<span class="hljs-attr">PLUS</span>: <span class="hljs-number">187</span>,
<span class="hljs-attr">COMMA</span>: <span class="hljs-number">188</span>,
<span class="hljs-attr">MINUS</span>: <span class="hljs-number">189</span>,
<span class="hljs-attr">PERIOD</span>: <span class="hljs-number">190</span>,
<span class="hljs-attr">PULT_UP</span>: <span class="hljs-number">29460</span>,
<span class="hljs-attr">PULT_DOWN</span>: <span class="hljs-number">29461</span>,
<span class="hljs-attr">PULT_LEFT</span>: <span class="hljs-number">4</span>,
PULT_RIGHT<span class="hljs-string">': 5</span></code></pre></span></div></div></div></div>
			
		</div>
	</div>
	<div class="clearer"></div>
	<div id="footer">
		<div id="contact">
			<a href="https://groups.google.com/forum/#!forum/craftyjs">
				<img src="../images/google.png">
				google groups</a>
			<a href="mailto:starwed@gmail.com">
				<img src="../images/email.png">
				starwed@gmail.com</a>
			<a href="https://github.com/craftyjs/Crafty">
				<img src="../images/github.png">
				github</a>
		</div>
		<ul>
			<li><a href="../">首页</a></li>
				<li><a href="../getting-started/">快速开始</a></li>
				<li><a href="../documentation/">文档</a></li>
				<li><a href="../api/">API</a></li>
				<li><a href="../components/">组件</a></li>
				<li class="emph"><a href="../#install">下载</a></li>
		</ul>
		<p>
			© Crafty 2010-2015. Crafty is distributed under the <a href="http://en.wikipedia.org/wiki/MIT_License">MIT License</a>.
		</p>
	</div>
</div>


</body></html>